﻿namespace JavaScript8000.Parser
{
    using System.Collections.Generic;

    /// <summary>
    /// Represent item which used in parser stack to control recursive character of rules.
    /// </summary>
    public class RuleZone
    {
        /// <summary>
        /// Gets or sets the token number where start current zone (in tokens).
        /// </summary>
        /// <value>
        /// The token number.
        /// </value>
        public int TokenNumber { get; set; }

        /// <summary>
        /// Gets or sets the children.
        /// </summary>
        /// <value>
        /// The children.
        /// </value>
        public List<GrammarNode> Children { get; set; }

        /// <summary>
        /// Gets or sets the rule token number.
        /// </summary>
        /// <value>
        /// The rule token number.
        /// </value>
        public int RuleTokenNumber { get; set; }

        /// <summary>
        /// Gets or sets the error.
        /// </summary>
        /// <value>
        /// The error.
        /// </value>
        public RuleZoneError Error { get; set; }
    }
}
